<?php

/**
 * Формы гостевой книги
 */
class AddonsForm extends Zend_Form {

    /**
     * Форма отзыва
     */
    public function upload() {
        $this->setName('addon');
        $this->setAttrib('enctype', 'multipart/form-data');
        $t = Zend_Registry::get('Zend_Locale');
        $addon = new Zend_Form_Element_File('addon');
        $addon->setLabel('Add-on')
                ->setDestination(PUBLIC_PATH . '/tmp')
                ->setRequired();
       
        $submit = new Zend_Form_Element_Submit('upload');
        $submit->setLabel('Upload');
        $submit->setAttrib('id', 'submitbutton');

        $this->addElements(array($addon,$submit));
        $this->setAction(ADMIN_URL . '/addons');
        $this->setDefaultTranslator($t);
        return $this;
    }
}